<?php

include '../../configs/global.php';
$data = $_POST;
$name = $data['name'];
$sid = $data['sid'];
$sex=$data['sex'];
$id=$data['id'];


$sql = "UPDATE student SET name='$name',sid='$sid',sex='$sex' where id='$id'";

$r1 = $pdo->exec($sql);
if ($r1) {
    header('location:/study/style/skip.php?url=admin/mainshow.php&info=修改成功！');
} else {
    header('location:/study/style/skip.php?url=admin/mainshow.php&info=修改失败,请稍后再试！');
}
// echo json_encode($ajax_res);
